﻿<controls:DialogWindow x:Class="ReflectionStudio.Components.Dialogs.Startup.StartupDlg"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
    Title="StartupDlg" Height="600" Width="400"
    Loaded="StartupDlg_Loaded">
        <Grid Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="130" />
                <RowDefinition Height="*" />
                <RowDefinition Height="40" />
            </Grid.RowDefinitions>
            <Grid>
                <Image HorizontalAlignment="Left" Margin="0" Source="/ReflectionStudio;component/Resources/Images/128x128/reflection_studio.png"
                       Stretch="Uniform" Width="128" />
                <Label FontWeight="Bold" FontSize="25" Margin="133.806,21,0,49"
                       VerticalContentAlignment="Center" >Reflection Studio</Label>
                <Label Margin="133.806,0,11,37" Height="26"
                       VerticalAlignment="Bottom" >.NET Performance injection software</Label>
            </Grid>
            <Grid Grid.Row="1" Margin="5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="38" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Button Grid.Column="0" Content="Projects" FontSize="19" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="BtnProjectView" Click="OnViewChange" />
            <Button Grid.Column="1" Content="Help" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="BtnHelpView" Click="OnViewChange" />
            <Button Grid.Column="2" Content="Samples" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="BtnSampleView" Click="OnViewChange" />
                
            <Grid Grid.ColumnSpan="3" Grid.Row="1" Visibility="Hidden" Name="ProjectView">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="40" />
                        <RowDefinition Height="40" />
                    </Grid.RowDefinitions>
                    <ListBox Grid.Row="0" ItemsSource="{Binding Workspace.RecentFiles}" Name="RecentProjectList" SelectionChanged="RecentProjectList_SelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Name}" HorizontalAlignment="Stretch" Height="25"></TextBlock>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <controls:ImageButton Grid.Row="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Click="BtnNewProject_Click"
                            Image="/ReflectionStudio;component/Resources/Images/32x32/new_project.png" Layout="Horizontal" Order="BeforeText">Start a new project
                    </controls:ImageButton>
                    <controls:ImageButton Grid.Row="2" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Click="BtnOpenProject_Click" 
                            Image="/ReflectionStudio;component/Resources/Images/32x32/folders/open_folder.png" Layout="Horizontal" Order="BeforeText">Open existing project
                    </controls:ImageButton>
                </Grid>
            </Grid>    
            <Grid Grid.ColumnSpan="3" Grid.Row="1" Visibility="Hidden" Name="HelpView">
                <StackPanel>
                    <controls:ImageButton HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Click="BtnHelp_Click"
                            Image="/ReflectionStudio;component/Resources/Images/32x32/application/help.png" Layout="Horizontal" Order="BeforeText">User manual</controls:ImageButton>
                    <controls:ImageButton HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Click="BtnTechHelp_Click"
                            Image="/ReflectionStudio;component/Resources/Images/32x32/application/help.png" Layout="Horizontal" Order="BeforeText">Technical help
                    </controls:ImageButton>
                </StackPanel>
            </Grid>    
            <Grid Grid.ColumnSpan="3" Grid.Row="1" Visibility="Hidden" Name="SampleView">
                <TextBlock>Not implemented</TextBlock>
                <TextBlock>Not implemented</TextBlock>
                <TextBlock>Not implemented</TextBlock>
                <TextBlock>Not implemented</TextBlock>
            </Grid>    
        </Grid>
        <CheckBox Grid.Row="2" HorizontalAlignment="Left" Name="checkBox1"
                  IsChecked="{Binding Workspace.ShowStartupDlg, Mode=TwoWay}" 
                  Margin="20,0,0,0" VerticalAlignment="Center">Run at startup</CheckBox>
        <Button Grid.Row="2" Name="buttonClose" HorizontalAlignment="Right" Width="135" 
                Click="close_Click" Margin="0,0,12,0" VerticalAlignment="Center" Height="32" IsDefault="False">Close</Button>
    </Grid>
</controls:DialogWindow>
